﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SlideshowGenerator
{
    public partial class Frm_Splashscreen : Form
    {
        public Frm_Splashscreen()
        {
            InitializeComponent();
        }

        private Timer _closeTimer = new Timer();

        protected override void OnPaint(PaintEventArgs e)
        {
            //do nothing
        }

        protected override void OnPaintBackground(PaintEventArgs e)
        {
            Graphics gfx = e.Graphics;
            gfx.DrawImage(Properties.Resources.veaySG, new RectangleF(new PointF(0, 0), this.Size));
            _closeTimer.Interval = 3000;
            _closeTimer.Tick += new EventHandler(_closeTimer_Tick);
            _closeTimer.Start();
        }

        void _closeTimer_Tick(object sender, EventArgs e)
        {
            _closeTimer.Stop();
            this.Dispose();
        }
    }
}
